//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension FMS {
    // MARK: Enums

    public enum AccountRoleStatus: String, CustomStringConvertible, Codable {
        case creating = "CREATING"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case pendingDeletion = "PENDING_DELETION"
        case ready = "READY"
        public var description: String { return self.rawValue }
    }

    public enum CustomerPolicyScopeIdType: String, CustomStringConvertible, Codable {
        case account = "ACCOUNT"
        case orgUnit = "ORG_UNIT"
        public var description: String { return self.rawValue }
    }

    public enum DependentServiceName: String, CustomStringConvertible, Codable {
        case awsconfig = "AWSCONFIG"
        case awsshieldAdvanced = "AWSSHIELD_ADVANCED"
        case awsvpc = "AWSVPC"
        case awswaf = "AWSWAF"
        public var description: String { return self.rawValue }
    }

    public enum PolicyComplianceStatusType: String, CustomStringConvertible, Codable {
        case compliant = "COMPLIANT"
        case nonCompliant = "NON_COMPLIANT"
        public var description: String { return self.rawValue }
    }

    public enum RemediationActionType: String, CustomStringConvertible, Codable {
        case modify = "MODIFY"
        case remove = "REMOVE"
        public var description: String { return self.rawValue }
    }

    public enum SecurityServiceType: String, CustomStringConvertible, Codable {
        case networkFirewall = "NETWORK_FIREWALL"
        case securityGroupsCommon = "SECURITY_GROUPS_COMMON"
        case securityGroupsContentAudit = "SECURITY_GROUPS_CONTENT_AUDIT"
        case securityGroupsUsageAudit = "SECURITY_GROUPS_USAGE_AUDIT"
        case shieldAdvanced = "SHIELD_ADVANCED"
        case waf = "WAF"
        case wafv2 = "WAFV2"
        public var description: String { return self.rawValue }
    }

    public enum ViolationReason: String, CustomStringConvertible, Codable {
        case missingExpectedRouteTable = "MISSING_EXPECTED_ROUTE_TABLE"
        case missingFirewall = "MISSING_FIREWALL"
        case missingFirewallSubnetInAz = "MISSING_FIREWALL_SUBNET_IN_AZ"
        case networkFirewallPolicyModified = "NETWORK_FIREWALL_POLICY_MODIFIED"
        case resourceIncorrectWebAcl = "RESOURCE_INCORRECT_WEB_ACL"
        case resourceMissingSecurityGroup = "RESOURCE_MISSING_SECURITY_GROUP"
        case resourceMissingShieldProtection = "RESOURCE_MISSING_SHIELD_PROTECTION"
        case resourceMissingWebAcl = "RESOURCE_MISSING_WEB_ACL"
        case resourceMissingWebAclOrShieldProtection = "RESOURCE_MISSING_WEB_ACL_OR_SHIELD_PROTECTION"
        case resourceViolatesAuditSecurityGroup = "RESOURCE_VIOLATES_AUDIT_SECURITY_GROUP"
        case securityGroupRedundant = "SECURITY_GROUP_REDUNDANT"
        case securityGroupUnused = "SECURITY_GROUP_UNUSED"
        case webAclMissingRuleGroup = "WEB_ACL_MISSING_RULE_GROUP"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct App: AWSEncodableShape & AWSDecodableShape {
        /// The application's name.
        public let appName: String
        /// The application's port number, for example 80.
        public let port: Int64
        /// The IP protocol name or number. The name can be one of tcp, udp, or icmp. For information on possible numbers, see Protocol Numbers.
        public let `protocol`: String

        public init(appName: String, port: Int64, protocol: String) {
            self.appName = appName
            self.port = port
            self.`protocol` = `protocol`
        }

        public func validate(name: String) throws {
            try self.validate(self.appName, name: "appName", parent: name, max: 128)
            try self.validate(self.appName, name: "appName", parent: name, min: 1)
            try self.validate(self.appName, name: "appName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 0)
            try self.validate(self.`protocol`, name: "`protocol`", parent: name, max: 20)
            try self.validate(self.`protocol`, name: "`protocol`", parent: name, min: 1)
            try self.validate(self.`protocol`, name: "`protocol`", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case appName = "AppName"
            case port = "Port"
            case `protocol` = "Protocol"
        }
    }

    public struct AppsListData: AWSEncodableShape & AWSDecodableShape {
        /// An array of applications in the AWS Firewall Manager applications list.
        public let appsList: [App]
        /// The time that the AWS Firewall Manager applications list was created.
        public let createTime: Date?
        /// The time that the AWS Firewall Manager applications list was last updated.
        public let lastUpdateTime: Date?
        /// The ID of the AWS Firewall Manager applications list.
        public let listId: String?
        /// The name of the AWS Firewall Manager applications list.
        public let listName: String
        /// A unique identifier for each update to the list. When you update the list, the update token must match the token of the current version of the application list. You can retrieve the update token by getting the list.
        public let listUpdateToken: String?
        /// A map of previous version numbers to their corresponding App object arrays.
        public let previousAppsList: [String: [App]]?

        public init(appsList: [App], createTime: Date? = nil, lastUpdateTime: Date? = nil, listId: String? = nil, listName: String, listUpdateToken: String? = nil, previousAppsList: [String: [App]]? = nil) {
            self.appsList = appsList
            self.createTime = createTime
            self.lastUpdateTime = lastUpdateTime
            self.listId = listId
            self.listName = listName
            self.listUpdateToken = listUpdateToken
            self.previousAppsList = previousAppsList
        }

        public func validate(name: String) throws {
            try self.appsList.forEach {
                try $0.validate(name: "\(name).appsList[]")
            }
            try self.validate(self.listId, name: "listId", parent: name, max: 36)
            try self.validate(self.listId, name: "listId", parent: name, min: 36)
            try self.validate(self.listId, name: "listId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
            try self.validate(self.listName, name: "listName", parent: name, max: 128)
            try self.validate(self.listName, name: "listName", parent: name, min: 1)
            try self.validate(self.listName, name: "listName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.listUpdateToken, name: "listUpdateToken", parent: name, max: 1024)
            try self.validate(self.listUpdateToken, name: "listUpdateToken", parent: name, min: 1)
            try self.validate(self.listUpdateToken, name: "listUpdateToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.previousAppsList?.forEach {
                try validate($0.key, name: "previousAppsList.key", parent: name, max: 2)
                try validate($0.key, name: "previousAppsList.key", parent: name, min: 1)
                try validate($0.key, name: "previousAppsList.key", parent: name, pattern: "^\\d{1,2}$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case appsList = "AppsList"
            case createTime = "CreateTime"
            case lastUpdateTime = "LastUpdateTime"
            case listId = "ListId"
            case listName = "ListName"
            case listUpdateToken = "ListUpdateToken"
            case previousAppsList = "PreviousAppsList"
        }
    }

    public struct AppsListDataSummary: AWSDecodableShape {
        /// An array of App objects in the AWS Firewall Manager applications list.
        public let appsList: [App]?
        /// The Amazon Resource Name (ARN) of the applications list.
        public let listArn: String?
        /// The ID of the applications list.
        public let listId: String?
        /// The name of the applications list.
        public let listName: String?

        public init(appsList: [App]? = nil, listArn: String? = nil, listId: String? = nil, listName: String? = nil) {
            self.appsList = appsList
            self.listArn = listArn
            self.listId = listId
            self.listName = listName
        }

        private enum CodingKeys: String, CodingKey {
            case appsList = "AppsList"
            case listArn = "ListArn"
            case listId = "ListId"
            case listName = "ListName"
        }
    }

    public struct AssociateAdminAccountRequest: AWSEncodableShape {
        /// The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall Manager administrator account. This can be an AWS Organizations master account or a member account. For more information about AWS Organizations and master accounts, see Managing the AWS Accounts in Your Organization.
        public let adminAccount: String

        public init(adminAccount: String) {
            self.adminAccount = adminAccount
        }

        public func validate(name: String) throws {
            try self.validate(self.adminAccount, name: "adminAccount", parent: name, max: 1024)
            try self.validate(self.adminAccount, name: "adminAccount", parent: name, min: 1)
            try self.validate(self.adminAccount, name: "adminAccount", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case adminAccount = "AdminAccount"
        }
    }

    public struct AwsEc2InstanceViolation: AWSDecodableShape {
        /// Violations for network interfaces associated with the EC2 instance.
        public let awsEc2NetworkInterfaceViolations: [AwsEc2NetworkInterfaceViolation]?
        /// The resource ID of the EC2 instance.
        public let violationTarget: String?

        public init(awsEc2NetworkInterfaceViolations: [AwsEc2NetworkInterfaceViolation]? = nil, violationTarget: String? = nil) {
            self.awsEc2NetworkInterfaceViolations = awsEc2NetworkInterfaceViolations
            self.violationTarget = violationTarget
        }

        private enum CodingKeys: String, CodingKey {
            case awsEc2NetworkInterfaceViolations = "AwsEc2NetworkInterfaceViolations"
            case violationTarget = "ViolationTarget"
        }
    }

    public struct AwsEc2NetworkInterfaceViolation: AWSDecodableShape {
        /// List of security groups that violate the rules specified in the master security group of the AWS Firewall Manager policy.
        public let violatingSecurityGroups: [String]?
        /// The resource ID of the network interface.
        public let violationTarget: String?

        public init(violatingSecurityGroups: [String]? = nil, violationTarget: String? = nil) {
            self.violatingSecurityGroups = violatingSecurityGroups
            self.violationTarget = violationTarget
        }

        private enum CodingKeys: String, CodingKey {
            case violatingSecurityGroups = "ViolatingSecurityGroups"
            case violationTarget = "ViolationTarget"
        }
    }

    public struct AwsVPCSecurityGroupViolation: AWSDecodableShape {
        /// List of rules specified in the security group of the AWS Firewall Manager policy that partially match the ViolationTarget rule.
        public let partialMatches: [PartialMatch]?
        /// Remediation options for the rule specified in the ViolationTarget.
        public let possibleSecurityGroupRemediationActions: [SecurityGroupRemediationAction]?
        /// The security group rule that is being evaluated.
        public let violationTarget: String?
        /// A description of the security group that violates the policy.
        public let violationTargetDescription: String?

        public init(partialMatches: [PartialMatch]? = nil, possibleSecurityGroupRemediationActions: [SecurityGroupRemediationAction]? = nil, violationTarget: String? = nil, violationTargetDescription: String? = nil) {
            self.partialMatches = partialMatches
            self.possibleSecurityGroupRemediationActions = possibleSecurityGroupRemediationActions
            self.violationTarget = violationTarget
            self.violationTargetDescription = violationTargetDescription
        }

        private enum CodingKeys: String, CodingKey {
            case partialMatches = "PartialMatches"
            case possibleSecurityGroupRemediationActions = "PossibleSecurityGroupRemediationActions"
            case violationTarget = "ViolationTarget"
            case violationTargetDescription = "ViolationTargetDescription"
        }
    }

    public struct ComplianceViolator: AWSDecodableShape {
        /// The resource ID.
        public let resourceId: String?
        /// The resource type. This is in the format shown in the AWS Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::CloudFront::Distribution, or AWS::NetworkFirewall::FirewallPolicy.
        public let resourceType: String?
        /// The reason that the resource is not protected by the policy.
        public let violationReason: ViolationReason?

        public init(resourceId: String? = nil, resourceType: String? = nil, violationReason: ViolationReason? = nil) {
            self.resourceId = resourceId
            self.resourceType = resourceType
            self.violationReason = violationReason
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
            case violationReason = "ViolationReason"
        }
    }

    public struct DeleteAppsListRequest: AWSEncodableShape {
        /// The ID of the applications list that you want to delete. You can retrieve this ID from PutAppsList, ListAppsLists, and GetAppsList.
        public let listId: String

        public init(listId: String) {
            self.listId = listId
        }

        public func validate(name: String) throws {
            try self.validate(self.listId, name: "listId", parent: name, max: 36)
            try self.validate(self.listId, name: "listId", parent: name, min: 36)
            try self.validate(self.listId, name: "listId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case listId = "ListId"
        }
    }

    public struct DeleteNotificationChannelRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DeletePolicyRequest: AWSEncodableShape {
        /// If True, the request performs cleanup according to the policy type.  For AWS WAF and Shield Advanced policies, the cleanup does the following:   Deletes rule groups created by AWS Firewall Manager   Removes web ACLs from in-scope resources   Deletes web ACLs that contain no rules or rule groups   For security group policies, the cleanup does the following for each security group in the policy:   Disassociates the security group from in-scope resources    Deletes the security group if it was created through Firewall Manager and if it's no longer associated with any resources through another policy   After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you associate with the policy. When creating the policy, if you specify that only resources in specific accounts or with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others are out of scope. If you don't specify tags or accounts, all resources are in scope.
        public let deleteAllPolicyResources: Bool?
        /// The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and ListPolicies.
        public let policyId: String

        public init(deleteAllPolicyResources: Bool? = nil, policyId: String) {
            self.deleteAllPolicyResources = deleteAllPolicyResources
            self.policyId = policyId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case deleteAllPolicyResources = "DeleteAllPolicyResources"
            case policyId = "PolicyId"
        }
    }

    public struct DeleteProtocolsListRequest: AWSEncodableShape {
        /// The ID of the protocols list that you want to delete. You can retrieve this ID from PutProtocolsList, ListProtocolsLists, and GetProtocolsLost.
        public let listId: String

        public init(listId: String) {
            self.listId = listId
        }

        public func validate(name: String) throws {
            try self.validate(self.listId, name: "listId", parent: name, max: 36)
            try self.validate(self.listId, name: "listId", parent: name, min: 36)
            try self.validate(self.listId, name: "listId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case listId = "ListId"
        }
    }

    public struct DisassociateAdminAccountRequest: AWSEncodableShape {
        public init() {}
    }

    public struct EvaluationResult: AWSDecodableShape {
        /// Describes an AWS account's compliance with the AWS Firewall Manager policy.
        public let complianceStatus: PolicyComplianceStatusType?
        /// Indicates that over 100 resources are noncompliant with the AWS Firewall Manager policy.
        public let evaluationLimitExceeded: Bool?
        /// The number of resources that are noncompliant with the specified policy. For AWS WAF and Shield Advanced policies, a resource is considered noncompliant if it is not associated with the policy. For security group policies, a resource is considered noncompliant if it doesn't comply with the rules of the policy and remediation is disabled or not possible.
        public let violatorCount: Int64?

        public init(complianceStatus: PolicyComplianceStatusType? = nil, evaluationLimitExceeded: Bool? = nil, violatorCount: Int64? = nil) {
            self.complianceStatus = complianceStatus
            self.evaluationLimitExceeded = evaluationLimitExceeded
            self.violatorCount = violatorCount
        }

        private enum CodingKeys: String, CodingKey {
            case complianceStatus = "ComplianceStatus"
            case evaluationLimitExceeded = "EvaluationLimitExceeded"
            case violatorCount = "ViolatorCount"
        }
    }

    public struct GetAdminAccountRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetAdminAccountResponse: AWSDecodableShape {
        /// The AWS account that is set as the AWS Firewall Manager administrator.
        public let adminAccount: String?
        /// The status of the AWS account that you set as the AWS Firewall Manager administrator.
        public let roleStatus: AccountRoleStatus?

        public init(adminAccount: String? = nil, roleStatus: AccountRoleStatus? = nil) {
            self.adminAccount = adminAccount
            self.roleStatus = roleStatus
        }

        private enum CodingKeys: String, CodingKey {
            case adminAccount = "AdminAccount"
            case roleStatus = "RoleStatus"
        }
    }

    public struct GetAppsListRequest: AWSEncodableShape {
        /// Specifies whether the list to retrieve is a default list owned by AWS Firewall Manager.
        public let defaultList: Bool?
        /// The ID of the AWS Firewall Manager applications list that you want the details for.
        public let listId: String

        public init(defaultList: Bool? = nil, listId: String) {
            self.defaultList = defaultList
            self.listId = listId
        }

        public func validate(name: String) throws {
            try self.validate(self.listId, name: "listId", parent: name, max: 36)
            try self.validate(self.listId, name: "listId", parent: name, min: 36)
            try self.validate(self.listId, name: "listId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultList = "DefaultList"
            case listId = "ListId"
        }
    }

    public struct GetAppsListResponse: AWSDecodableShape {
        /// Information about the specified AWS Firewall Manager applications list.
        public let appsList: AppsListData?
        /// The Amazon Resource Name (ARN) of the applications list.
        public let appsListArn: String?

        public init(appsList: AppsListData? = nil, appsListArn: String? = nil) {
            self.appsList = appsList
            self.appsListArn = appsListArn
        }

        private enum CodingKeys: String, CodingKey {
            case appsList = "AppsList"
            case appsListArn = "AppsListArn"
        }
    }

    public struct GetComplianceDetailRequest: AWSEncodableShape {
        /// The AWS account that owns the resources that you want to get the details for.
        public let memberAccount: String
        /// The ID of the policy that you want to get the details for. PolicyId is returned by PutPolicy and by ListPolicies.
        public let policyId: String

        public init(memberAccount: String, policyId: String) {
            self.memberAccount = memberAccount
            self.policyId = policyId
        }

        public func validate(name: String) throws {
            try self.validate(self.memberAccount, name: "memberAccount", parent: name, max: 1024)
            try self.validate(self.memberAccount, name: "memberAccount", parent: name, min: 1)
            try self.validate(self.memberAccount, name: "memberAccount", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case memberAccount = "MemberAccount"
            case policyId = "PolicyId"
        }
    }

    public struct GetComplianceDetailResponse: AWSDecodableShape {
        /// Information about the resources and the policy that you specified in the GetComplianceDetail request.
        public let policyComplianceDetail: PolicyComplianceDetail?

        public init(policyComplianceDetail: PolicyComplianceDetail? = nil) {
            self.policyComplianceDetail = policyComplianceDetail
        }

        private enum CodingKeys: String, CodingKey {
            case policyComplianceDetail = "PolicyComplianceDetail"
        }
    }

    public struct GetNotificationChannelRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetNotificationChannelResponse: AWSDecodableShape {
        /// The IAM role that is used by AWS Firewall Manager to record activity to SNS.
        public let snsRoleName: String?
        /// The SNS topic that records AWS Firewall Manager activity.
        public let snsTopicArn: String?

        public init(snsRoleName: String? = nil, snsTopicArn: String? = nil) {
            self.snsRoleName = snsRoleName
            self.snsTopicArn = snsTopicArn
        }

        private enum CodingKeys: String, CodingKey {
            case snsRoleName = "SnsRoleName"
            case snsTopicArn = "SnsTopicArn"
        }
    }

    public struct GetPolicyRequest: AWSEncodableShape {
        /// The ID of the AWS Firewall Manager policy that you want the details for.
        public let policyId: String

        public init(policyId: String) {
            self.policyId = policyId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyId = "PolicyId"
        }
    }

    public struct GetPolicyResponse: AWSDecodableShape {
        /// Information about the specified AWS Firewall Manager policy.
        public let policy: Policy?
        /// The Amazon Resource Name (ARN) of the specified policy.
        public let policyArn: String?

        public init(policy: Policy? = nil, policyArn: String? = nil) {
            self.policy = policy
            self.policyArn = policyArn
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
            case policyArn = "PolicyArn"
        }
    }

    public struct GetProtectionStatusRequest: AWSEncodableShape {
        /// The end of the time period to query for the attacks. This is a timestamp type. The request syntax listing indicates a number type because the default used by AWS Firewall Manager is Unix time in seconds. However, any valid timestamp format is allowed.
        public let endTime: Date?
        /// Specifies the number of objects that you want AWS Firewall Manager to return for this request. If you have more objects than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of objects.
        public let maxResults: Int?
        /// The AWS account that is in scope of the policy that you want to get the details for.
        public let memberAccountId: String?
        /// If you specify a value for MaxResults and you have more objects than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response, which you can use to retrieve another group of objects. For the second and subsequent GetProtectionStatus requests, specify the value of NextToken from the previous response to get information about another batch of objects.
        public let nextToken: String?
        /// The ID of the policy for which you want to get the attack information.
        public let policyId: String
        /// The start of the time period to query for the attacks. This is a timestamp type. The request syntax listing indicates a number type because the default used by AWS Firewall Manager is Unix time in seconds. However, any valid timestamp format is allowed.
        public let startTime: Date?

        public init(endTime: Date? = nil, maxResults: Int? = nil, memberAccountId: String? = nil, nextToken: String? = nil, policyId: String, startTime: Date? = nil) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.memberAccountId = memberAccountId
            self.nextToken = nextToken
            self.policyId = policyId
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.memberAccountId, name: "memberAccountId", parent: name, max: 1024)
            try self.validate(self.memberAccountId, name: "memberAccountId", parent: name, min: 1)
            try self.validate(self.memberAccountId, name: "memberAccountId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case maxResults = "MaxResults"
            case memberAccountId = "MemberAccountId"
            case nextToken = "NextToken"
            case policyId = "PolicyId"
            case startTime = "StartTime"
        }
    }

    public struct GetProtectionStatusResponse: AWSDecodableShape {
        /// The ID of the AWS Firewall administrator account for this policy.
        public let adminAccountId: String?
        /// Details about the attack, including the following:   Attack type   Account ID   ARN of the resource attacked   Start time of the attack   End time of the attack (ongoing attacks will not have an end time)   The details are in JSON format.
        public let data: String?
        /// If you have more objects than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more objects, submit another GetProtectionStatus request, and specify the NextToken value from the response in the NextToken value in the next request. AWS SDKs provide auto-pagination that identify NextToken in a response and make subsequent request calls automatically on your behalf. However, this feature is not supported by GetProtectionStatus. You must submit subsequent requests with NextToken using your own processes.
        public let nextToken: String?
        /// The service type that is protected by the policy. Currently, this is always SHIELD_ADVANCED.
        public let serviceType: SecurityServiceType?

        public init(adminAccountId: String? = nil, data: String? = nil, nextToken: String? = nil, serviceType: SecurityServiceType? = nil) {
            self.adminAccountId = adminAccountId
            self.data = data
            self.nextToken = nextToken
            self.serviceType = serviceType
        }

        private enum CodingKeys: String, CodingKey {
            case adminAccountId = "AdminAccountId"
            case data = "Data"
            case nextToken = "NextToken"
            case serviceType = "ServiceType"
        }
    }

    public struct GetProtocolsListRequest: AWSEncodableShape {
        /// Specifies whether the list to retrieve is a default list owned by AWS Firewall Manager.
        public let defaultList: Bool?
        /// The ID of the AWS Firewall Manager protocols list that you want the details for.
        public let listId: String

        public init(defaultList: Bool? = nil, listId: String) {
            self.defaultList = defaultList
            self.listId = listId
        }

        public func validate(name: String) throws {
            try self.validate(self.listId, name: "listId", parent: name, max: 36)
            try self.validate(self.listId, name: "listId", parent: name, min: 36)
            try self.validate(self.listId, name: "listId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultList = "DefaultList"
            case listId = "ListId"
        }
    }

    public struct GetProtocolsListResponse: AWSDecodableShape {
        /// Information about the specified AWS Firewall Manager protocols list.
        public let protocolsList: ProtocolsListData?
        /// The Amazon Resource Name (ARN) of the specified protocols list.
        public let protocolsListArn: String?

        public init(protocolsList: ProtocolsListData? = nil, protocolsListArn: String? = nil) {
            self.protocolsList = protocolsList
            self.protocolsListArn = protocolsListArn
        }

        private enum CodingKeys: String, CodingKey {
            case protocolsList = "ProtocolsList"
            case protocolsListArn = "ProtocolsListArn"
        }
    }

    public struct GetViolationDetailsRequest: AWSEncodableShape {
        /// The AWS account ID that you want the details for.
        public let memberAccount: String
        /// The ID of the AWS Firewall Manager policy that you want the details for. This currently only supports security group content audit policies.
        public let policyId: String
        /// The ID of the resource that has violations.
        public let resourceId: String
        /// The resource type. This is in the format shown in the AWS Resource Types Reference. Supported resource types are: AWS::EC2::Instance, AWS::EC2::NetworkInterface, AWS::EC2::SecurityGroup, AWS::NetworkFirewall::FirewallPolicy, and AWS::EC2::Subnet.
        public let resourceType: String

        public init(memberAccount: String, policyId: String, resourceId: String, resourceType: String) {
            self.memberAccount = memberAccount
            self.policyId = policyId
            self.resourceId = resourceId
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.memberAccount, name: "memberAccount", parent: name, max: 1024)
            try self.validate(self.memberAccount, name: "memberAccount", parent: name, min: 1)
            try self.validate(self.memberAccount, name: "memberAccount", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1024)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.resourceType, name: "resourceType", parent: name, max: 128)
            try self.validate(self.resourceType, name: "resourceType", parent: name, min: 1)
            try self.validate(self.resourceType, name: "resourceType", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case memberAccount = "MemberAccount"
            case policyId = "PolicyId"
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
        }
    }

    public struct GetViolationDetailsResponse: AWSDecodableShape {
        /// Violation detail for a resource.
        public let violationDetail: ViolationDetail?

        public init(violationDetail: ViolationDetail? = nil) {
            self.violationDetail = violationDetail
        }

        private enum CodingKeys: String, CodingKey {
            case violationDetail = "ViolationDetail"
        }
    }

    public struct ListAppsListsRequest: AWSEncodableShape {
        /// Specifies whether the lists to retrieve are default lists owned by AWS Firewall Manager.
        public let defaultLists: Bool?
        /// The maximum number of objects that you want AWS Firewall Manager to return for this request. If more objects are available, in the response, AWS Firewall Manager provides a NextToken value that you can use in a subsequent call to get the next batch of objects. If you don't specify this, AWS Firewall Manager returns all available objects.
        public let maxResults: Int
        /// If you specify a value for MaxResults in your list request, and you have more objects than the maximum, AWS Firewall Manager returns this token in the response. For all but the first request, you provide the token returned by the prior request in the request parameters, to retrieve the next batch of objects.
        public let nextToken: String?

        public init(defaultLists: Bool? = nil, maxResults: Int, nextToken: String? = nil) {
            self.defaultLists = defaultLists
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultLists = "DefaultLists"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAppsListsResponse: AWSDecodableShape {
        /// An array of AppsListDataSummary objects.
        public let appsLists: [AppsListDataSummary]?
        /// If you specify a value for MaxResults in your list request, and you have more objects than the maximum, AWS Firewall Manager returns this token in the response. You can use this token in subsequent requests to retrieve the next batch of objects.
        public let nextToken: String?

        public init(appsLists: [AppsListDataSummary]? = nil, nextToken: String? = nil) {
            self.appsLists = appsLists
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case appsLists = "AppsLists"
            case nextToken = "NextToken"
        }
    }

    public struct ListComplianceStatusRequest: AWSEncodableShape {
        /// Specifies the number of PolicyComplianceStatus objects that you want AWS Firewall Manager to return for this request. If you have more PolicyComplianceStatus objects than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of PolicyComplianceStatus objects.
        public let maxResults: Int?
        /// If you specify a value for MaxResults and you have more PolicyComplianceStatus objects than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus requests, specify the value of NextToken from the previous response to get information about another batch of PolicyComplianceStatus objects.
        public let nextToken: String?
        /// The ID of the AWS Firewall Manager policy that you want the details for.
        public let policyId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, policyId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.policyId = policyId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case policyId = "PolicyId"
        }
    }

    public struct ListComplianceStatusResponse: AWSDecodableShape {
        /// If you have more PolicyComplianceStatus objects than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus request, and specify the NextToken value from the response in the NextToken value in the next request.
        public let nextToken: String?
        /// An array of PolicyComplianceStatus objects.
        public let policyComplianceStatusList: [PolicyComplianceStatus]?

        public init(nextToken: String? = nil, policyComplianceStatusList: [PolicyComplianceStatus]? = nil) {
            self.nextToken = nextToken
            self.policyComplianceStatusList = policyComplianceStatusList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case policyComplianceStatusList = "PolicyComplianceStatusList"
        }
    }

    public struct ListMemberAccountsRequest: AWSEncodableShape {
        /// Specifies the number of member account IDs that you want AWS Firewall Manager to return for this request. If you have more IDs than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of member account IDs.
        public let maxResults: Int?
        /// If you specify a value for MaxResults and you have more account IDs than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of IDs. For the second and subsequent ListMemberAccountsRequest requests, specify the value of NextToken from the previous response to get information about another batch of member account IDs.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListMemberAccountsResponse: AWSDecodableShape {
        /// An array of account IDs.
        public let memberAccounts: [String]?
        /// If you have more member account IDs than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more IDs, submit another ListMemberAccounts request, and specify the NextToken value from the response in the NextToken value in the next request.
        public let nextToken: String?

        public init(memberAccounts: [String]? = nil, nextToken: String? = nil) {
            self.memberAccounts = memberAccounts
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case memberAccounts = "MemberAccounts"
            case nextToken = "NextToken"
        }
    }

    public struct ListPoliciesRequest: AWSEncodableShape {
        /// Specifies the number of PolicySummary objects that you want AWS Firewall Manager to return for this request. If you have more PolicySummary objects than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of PolicySummary objects.
        public let maxResults: Int?
        /// If you specify a value for MaxResults and you have more PolicySummary objects than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of PolicySummary objects. For the second and subsequent ListPolicies requests, specify the value of NextToken from the previous response to get information about another batch of PolicySummary objects.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListPoliciesResponse: AWSDecodableShape {
        /// If you have more PolicySummary objects than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more PolicySummary objects, submit another ListPolicies request, and specify the NextToken value from the response in the NextToken value in the next request.
        public let nextToken: String?
        /// An array of PolicySummary objects.
        public let policyList: [PolicySummary]?

        public init(nextToken: String? = nil, policyList: [PolicySummary]? = nil) {
            self.nextToken = nextToken
            self.policyList = policyList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case policyList = "PolicyList"
        }
    }

    public struct ListProtocolsListsRequest: AWSEncodableShape {
        /// Specifies whether the lists to retrieve are default lists owned by AWS Firewall Manager.
        public let defaultLists: Bool?
        /// The maximum number of objects that you want AWS Firewall Manager to return for this request. If more objects are available, in the response, AWS Firewall Manager provides a NextToken value that you can use in a subsequent call to get the next batch of objects. If you don't specify this, AWS Firewall Manager returns all available objects.
        public let maxResults: Int
        /// If you specify a value for MaxResults in your list request, and you have more objects than the maximum, AWS Firewall Manager returns this token in the response. For all but the first request, you provide the token returned by the prior request in the request parameters, to retrieve the next batch of objects.
        public let nextToken: String?

        public init(defaultLists: Bool? = nil, maxResults: Int, nextToken: String? = nil) {
            self.defaultLists = defaultLists
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultLists = "DefaultLists"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListProtocolsListsResponse: AWSDecodableShape {
        /// If you specify a value for MaxResults in your list request, and you have more objects than the maximum, AWS Firewall Manager returns this token in the response. You can use this token in subsequent requests to retrieve the next batch of objects.
        public let nextToken: String?
        /// An array of ProtocolsListDataSummary objects.
        public let protocolsLists: [ProtocolsListDataSummary]?

        public init(nextToken: String? = nil, protocolsLists: [ProtocolsListDataSummary]? = nil) {
            self.nextToken = nextToken
            self.protocolsLists = protocolsLists
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case protocolsLists = "ProtocolsLists"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to return tags for. The AWS Firewall Manager resources that support tagging are policies, applications lists, and protocols lists.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1024)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags associated with the resource.
        public let tagList: [Tag]?

        public init(tagList: [Tag]? = nil) {
            self.tagList = tagList
        }

        private enum CodingKeys: String, CodingKey {
            case tagList = "TagList"
        }
    }

    public struct NetworkFirewallMissingExpectedRTViolation: AWSDecodableShape {
        /// The Availability Zone of a violating subnet.
        public let availabilityZone: String?
        /// The resource ID of the current route table that's associated with the subnet, if one is available.
        public let currentRouteTable: String?
        /// The resource ID of the route table that should be associated with the subnet.
        public let expectedRouteTable: String?
        /// The ID of the AWS Network Firewall or VPC resource that's in violation.
        public let violationTarget: String?
        /// The resource ID of the VPC associated with a violating subnet.
        public let vpc: String?

        public init(availabilityZone: String? = nil, currentRouteTable: String? = nil, expectedRouteTable: String? = nil, violationTarget: String? = nil, vpc: String? = nil) {
            self.availabilityZone = availabilityZone
            self.currentRouteTable = currentRouteTable
            self.expectedRouteTable = expectedRouteTable
            self.violationTarget = violationTarget
            self.vpc = vpc
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "AvailabilityZone"
            case currentRouteTable = "CurrentRouteTable"
            case expectedRouteTable = "ExpectedRouteTable"
            case violationTarget = "ViolationTarget"
            case vpc = "VPC"
        }
    }

    public struct NetworkFirewallMissingFirewallViolation: AWSDecodableShape {
        /// The Availability Zone of a violating subnet.
        public let availabilityZone: String?
        /// The reason the resource has this violation, if one is available.
        public let targetViolationReason: String?
        /// The ID of the AWS Network Firewall or VPC resource that's in violation.
        public let violationTarget: String?
        /// The resource ID of the VPC associated with a violating subnet.
        public let vpc: String?

        public init(availabilityZone: String? = nil, targetViolationReason: String? = nil, violationTarget: String? = nil, vpc: String? = nil) {
            self.availabilityZone = availabilityZone
            self.targetViolationReason = targetViolationReason
            self.violationTarget = violationTarget
            self.vpc = vpc
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "AvailabilityZone"
            case targetViolationReason = "TargetViolationReason"
            case violationTarget = "ViolationTarget"
            case vpc = "VPC"
        }
    }

    public struct NetworkFirewallMissingSubnetViolation: AWSDecodableShape {
        /// The Availability Zone of a violating subnet.
        public let availabilityZone: String?
        /// The reason the resource has this violation, if one is available.
        public let targetViolationReason: String?
        /// The ID of the AWS Network Firewall or VPC resource that's in violation.
        public let violationTarget: String?
        /// The resource ID of the VPC associated with a violating subnet.
        public let vpc: String?

        public init(availabilityZone: String? = nil, targetViolationReason: String? = nil, violationTarget: String? = nil, vpc: String? = nil) {
            self.availabilityZone = availabilityZone
            self.targetViolationReason = targetViolationReason
            self.violationTarget = violationTarget
            self.vpc = vpc
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "AvailabilityZone"
            case targetViolationReason = "TargetViolationReason"
            case violationTarget = "ViolationTarget"
            case vpc = "VPC"
        }
    }

    public struct NetworkFirewallPolicyDescription: AWSDecodableShape {
        /// The stateful rule groups that are used in the Network Firewall firewall policy.
        public let statefulRuleGroups: [StatefulRuleGroup]?
        /// Names of custom actions that are available for use in the stateless default actions settings.
        public let statelessCustomActions: [String]?
        /// The actions to take on packets that don't match any of the stateless rule groups.
        public let statelessDefaultActions: [String]?
        /// The actions to take on packet fragments that don't match any of the stateless rule groups.
        public let statelessFragmentDefaultActions: [String]?
        /// The stateless rule groups that are used in the Network Firewall firewall policy.
        public let statelessRuleGroups: [StatelessRuleGroup]?

        public init(statefulRuleGroups: [StatefulRuleGroup]? = nil, statelessCustomActions: [String]? = nil, statelessDefaultActions: [String]? = nil, statelessFragmentDefaultActions: [String]? = nil, statelessRuleGroups: [StatelessRuleGroup]? = nil) {
            self.statefulRuleGroups = statefulRuleGroups
            self.statelessCustomActions = statelessCustomActions
            self.statelessDefaultActions = statelessDefaultActions
            self.statelessFragmentDefaultActions = statelessFragmentDefaultActions
            self.statelessRuleGroups = statelessRuleGroups
        }

        private enum CodingKeys: String, CodingKey {
            case statefulRuleGroups = "StatefulRuleGroups"
            case statelessCustomActions = "StatelessCustomActions"
            case statelessDefaultActions = "StatelessDefaultActions"
            case statelessFragmentDefaultActions = "StatelessFragmentDefaultActions"
            case statelessRuleGroups = "StatelessRuleGroups"
        }
    }

    public struct NetworkFirewallPolicyModifiedViolation: AWSDecodableShape {
        /// The policy that's currently in use in the individual account.
        public let currentPolicyDescription: NetworkFirewallPolicyDescription?
        /// The policy that should be in use in the individual account in order to be compliant.
        public let expectedPolicyDescription: NetworkFirewallPolicyDescription?
        /// The ID of the AWS Network Firewall or VPC resource that's in violation.
        public let violationTarget: String?

        public init(currentPolicyDescription: NetworkFirewallPolicyDescription? = nil, expectedPolicyDescription: NetworkFirewallPolicyDescription? = nil, violationTarget: String? = nil) {
            self.currentPolicyDescription = currentPolicyDescription
            self.expectedPolicyDescription = expectedPolicyDescription
            self.violationTarget = violationTarget
        }

        private enum CodingKeys: String, CodingKey {
            case currentPolicyDescription = "CurrentPolicyDescription"
            case expectedPolicyDescription = "ExpectedPolicyDescription"
            case violationTarget = "ViolationTarget"
        }
    }

    public struct PartialMatch: AWSDecodableShape {
        /// The reference rule from the master security group of the AWS Firewall Manager policy.
        public let reference: String?
        /// The violation reason.
        public let targetViolationReasons: [String]?

        public init(reference: String? = nil, targetViolationReasons: [String]? = nil) {
            self.reference = reference
            self.targetViolationReasons = targetViolationReasons
        }

        private enum CodingKeys: String, CodingKey {
            case reference = "Reference"
            case targetViolationReasons = "TargetViolationReasons"
        }
    }

    public struct Policy: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the AWS account IDs and AWS Organizations organizational units (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time. You can specify inclusions or exclusions, but not both. If you specify an IncludeMap, AWS Firewall Manager applies the policy to all accounts specified by the IncludeMap, and does not evaluate any ExcludeMap specifications. If you do not specify an IncludeMap, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap. You can specify account IDs, OUs, or a combination:    Specify account IDs by setting the key to ACCOUNT. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”]}.   Specify OUs by setting the key to ORG_UNIT. For example, the following is a valid map: {“ORG_UNIT” : [“ouid111”, “ouid112”]}.   Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}.
        public let excludeMap: [CustomerPolicyScopeIdType: [String]]?
        /// If set to True, resources with the tags that are specified in the ResourceTag array are not in scope of the policy. If set to False, and the ResourceTag array is not null, only resources with the specified tags are in scope of the policy.
        public let excludeResourceTags: Bool
        /// Specifies the AWS account IDs and AWS Organizations organizational units (OUs) to include in the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time. You can specify inclusions or exclusions, but not both. If you specify an IncludeMap, AWS Firewall Manager applies the policy to all accounts specified by the IncludeMap, and does not evaluate any ExcludeMap specifications. If you do not specify an IncludeMap, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap. You can specify account IDs, OUs, or a combination:    Specify account IDs by setting the key to ACCOUNT. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”]}.   Specify OUs by setting the key to ORG_UNIT. For example, the following is a valid map: {“ORG_UNIT” : [“ouid111”, “ouid112”]}.   Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}.
        public let includeMap: [CustomerPolicyScopeIdType: [String]]?
        /// The ID of the AWS Firewall Manager policy.
        public let policyId: String?
        /// The name of the AWS Firewall Manager policy.
        public let policyName: String
        /// A unique identifier for each update to the policy. When issuing a PutPolicy request, the PolicyUpdateToken in the request must match the PolicyUpdateToken of the current policy version. To get the PolicyUpdateToken of the current policy version, use a GetPolicy request.
        public let policyUpdateToken: String?
        /// Indicates if the policy should be automatically applied to new resources.
        public let remediationEnabled: Bool
        /// An array of ResourceTag objects.
        public let resourceTags: [ResourceTag]?
        /// The type of resource protected by or in scope of the policy. This is in the format shown in the AWS Resource Types Reference. For AWS WAF and Shield Advanced, examples include AWS::ElasticLoadBalancingV2::LoadBalancer and AWS::CloudFront::Distribution. For a security group common policy, valid values are AWS::EC2::NetworkInterface and AWS::EC2::Instance. For a security group content audit policy, valid values are AWS::EC2::SecurityGroup, AWS::EC2::NetworkInterface, and AWS::EC2::Instance. For a security group usage audit policy, the value is AWS::EC2::SecurityGroup. For an AWS Network Firewall policy, the value is AWS::EC2::VPC.
        public let resourceType: String
        /// An array of ResourceType.
        public let resourceTypeList: [String]?
        /// Details about the security service that is being used to protect the resources.
        public let securityServicePolicyData: SecurityServicePolicyData

        public init(excludeMap: [CustomerPolicyScopeIdType: [String]]? = nil, excludeResourceTags: Bool, includeMap: [CustomerPolicyScopeIdType: [String]]? = nil, policyId: String? = nil, policyName: String, policyUpdateToken: String? = nil, remediationEnabled: Bool, resourceTags: [ResourceTag]? = nil, resourceType: String, resourceTypeList: [String]? = nil, securityServicePolicyData: SecurityServicePolicyData) {
            self.excludeMap = excludeMap
            self.excludeResourceTags = excludeResourceTags
            self.includeMap = includeMap
            self.policyId = policyId
            self.policyName = policyName
            self.policyUpdateToken = policyUpdateToken
            self.remediationEnabled = remediationEnabled
            self.resourceTags = resourceTags
            self.resourceType = resourceType
            self.resourceTypeList = resourceTypeList
            self.securityServicePolicyData = securityServicePolicyData
        }

        public func validate(name: String) throws {
            try self.validate(self.policyId, name: "policyId", parent: name, max: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, min: 36)
            try self.validate(self.policyId, name: "policyId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.policyUpdateToken, name: "policyUpdateToken", parent: name, max: 1024)
            try self.validate(self.policyUpdateToken, name: "policyUpdateToken", parent: name, min: 1)
            try self.validate(self.policyUpdateToken, name: "policyUpdateToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.resourceTags?.forEach {
                try $0.validate(name: "\(name).resourceTags[]")
            }
            try self.validate(self.resourceTags, name: "resourceTags", parent: name, max: 8)
            try self.validate(self.resourceTags, name: "resourceTags", parent: name, min: 0)
            try self.validate(self.resourceType, name: "resourceType", parent: name, max: 128)
            try self.validate(self.resourceType, name: "resourceType", parent: name, min: 1)
            try self.validate(self.resourceType, name: "resourceType", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.resourceTypeList?.forEach {
                try validate($0, name: "resourceTypeList[]", parent: name, max: 128)
                try validate($0, name: "resourceTypeList[]", parent: name, min: 1)
                try validate($0, name: "resourceTypeList[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.securityServicePolicyData.validate(name: "\(name).securityServicePolicyData")
        }

        private enum CodingKeys: String, CodingKey {
            case excludeMap = "ExcludeMap"
            case excludeResourceTags = "ExcludeResourceTags"
            case includeMap = "IncludeMap"
            case policyId = "PolicyId"
            case policyName = "PolicyName"
            case policyUpdateToken = "PolicyUpdateToken"
            case remediationEnabled = "RemediationEnabled"
            case resourceTags = "ResourceTags"
            case resourceType = "ResourceType"
            case resourceTypeList = "ResourceTypeList"
            case securityServicePolicyData = "SecurityServicePolicyData"
        }
    }

    public struct PolicyComplianceDetail: AWSDecodableShape {
        /// Indicates if over 100 resources are noncompliant with the AWS Firewall Manager policy.
        public let evaluationLimitExceeded: Bool?
        /// A timestamp that indicates when the returned information should be considered out of date.
        public let expiredAt: Date?
        /// Details about problems with dependent services, such as AWS WAF or AWS Config, that are causing a resource to be noncompliant. The details include the name of the dependent service and the error message received that indicates the problem with the service.
        public let issueInfoMap: [DependentServiceName: String]?
        /// The AWS account ID.
        public let memberAccount: String?
        /// The ID of the AWS Firewall Manager policy.
        public let policyId: String?
        /// The AWS account that created the AWS Firewall Manager policy.
        public let policyOwner: String?
        /// An array of resources that aren't protected by the AWS WAF or Shield Advanced policy or that aren't in compliance with the security group policy.
        public let violators: [ComplianceViolator]?

        public init(evaluationLimitExceeded: Bool? = nil, expiredAt: Date? = nil, issueInfoMap: [DependentServiceName: String]? = nil, memberAccount: String? = nil, policyId: String? = nil, policyOwner: String? = nil, violators: [ComplianceViolator]? = nil) {
            self.evaluationLimitExceeded = evaluationLimitExceeded
            self.expiredAt = expiredAt
            self.issueInfoMap = issueInfoMap
            self.memberAccount = memberAccount
            self.policyId = policyId
            self.policyOwner = policyOwner
            self.violators = violators
        }

        private enum CodingKeys: String, CodingKey {
            case evaluationLimitExceeded = "EvaluationLimitExceeded"
            case expiredAt = "ExpiredAt"
            case issueInfoMap = "IssueInfoMap"
            case memberAccount = "MemberAccount"
            case policyId = "PolicyId"
            case policyOwner = "PolicyOwner"
            case violators = "Violators"
        }
    }

    public struct PolicyComplianceStatus: AWSDecodableShape {
        /// An array of EvaluationResult objects.
        public let evaluationResults: [EvaluationResult]?
        /// Details about problems with dependent services, such as AWS WAF or AWS Config, that are causing a resource to be noncompliant. The details include the name of the dependent service and the error message received that indicates the problem with the service.
        public let issueInfoMap: [DependentServiceName: String]?
        /// Timestamp of the last update to the EvaluationResult objects.
        public let lastUpdated: Date?
        /// The member account ID.
        public let memberAccount: String?
        /// The ID of the AWS Firewall Manager policy.
        public let policyId: String?
        /// The name of the AWS Firewall Manager policy.
        public let policyName: String?
        /// The AWS account that created the AWS Firewall Manager policy.
        public let policyOwner: String?

        public init(evaluationResults: [EvaluationResult]? = nil, issueInfoMap: [DependentServiceName: String]? = nil, lastUpdated: Date? = nil, memberAccount: String? = nil, policyId: String? = nil, policyName: String? = nil, policyOwner: String? = nil) {
            self.evaluationResults = evaluationResults
            self.issueInfoMap = issueInfoMap
            self.lastUpdated = lastUpdated
            self.memberAccount = memberAccount
            self.policyId = policyId
            self.policyName = policyName
            self.policyOwner = policyOwner
        }

        private enum CodingKeys: String, CodingKey {
            case evaluationResults = "EvaluationResults"
            case issueInfoMap = "IssueInfoMap"
            case lastUpdated = "LastUpdated"
            case memberAccount = "MemberAccount"
            case policyId = "PolicyId"
            case policyName = "PolicyName"
            case policyOwner = "PolicyOwner"
        }
    }

    public struct PolicySummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the specified policy.
        public let policyArn: String?
        /// The ID of the specified policy.
        public let policyId: String?
        /// The name of the specified policy.
        public let policyName: String?
        /// Indicates if the policy should be automatically applied to new resources.
        public let remediationEnabled: Bool?
        /// The type of resource protected by or in scope of the policy. This is in the format shown in the AWS Resource Types Reference. For AWS WAF and Shield Advanced, examples include AWS::ElasticLoadBalancingV2::LoadBalancer and AWS::CloudFront::Distribution. For a security group common policy, valid values are AWS::EC2::NetworkInterface and AWS::EC2::Instance. For a security group content audit policy, valid values are AWS::EC2::SecurityGroup, AWS::EC2::NetworkInterface, and AWS::EC2::Instance. For a security group usage audit policy, the value is AWS::EC2::SecurityGroup. For an AWS Network Firewall policy, the value is AWS::EC2::VPC.
        public let resourceType: String?
        /// The service that the policy is using to protect the resources. This specifies the type of policy that is created, either an AWS WAF policy, a Shield Advanced policy, or a security group policy.
        public let securityServiceType: SecurityServiceType?

        public init(policyArn: String? = nil, policyId: String? = nil, policyName: String? = nil, remediationEnabled: Bool? = nil, resourceType: String? = nil, securityServiceType: SecurityServiceType? = nil) {
            self.policyArn = policyArn
            self.policyId = policyId
            self.policyName = policyName
            self.remediationEnabled = remediationEnabled
            self.resourceType = resourceType
            self.securityServiceType = securityServiceType
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn = "PolicyArn"
            case policyId = "PolicyId"
            case policyName = "PolicyName"
            case remediationEnabled = "RemediationEnabled"
            case resourceType = "ResourceType"
            case securityServiceType = "SecurityServiceType"
        }
    }

    public struct ProtocolsListData: AWSEncodableShape & AWSDecodableShape {
        /// The time that the AWS Firewall Manager protocols list was created.
        public let createTime: Date?
        /// The time that the AWS Firewall Manager protocols list was last updated.
        public let lastUpdateTime: Date?
        /// The ID of the AWS Firewall Manager protocols list.
        public let listId: String?
        /// The name of the AWS Firewall Manager protocols list.
        public let listName: String
        /// A unique identifier for each update to the list. When you update the list, the update token must match the token of the current version of the application list. You can retrieve the update token by getting the list.
        public let listUpdateToken: String?
        /// A map of previous version numbers to their corresponding protocol arrays.
        public let previousProtocolsList: [String: [String]]?
        /// An array of protocols in the AWS Firewall Manager protocols list.
        public let protocolsList: [String]

        public init(createTime: Date? = nil, lastUpdateTime: Date? = nil, listId: String? = nil, listName: String, listUpdateToken: String? = nil, previousProtocolsList: [String: [String]]? = nil, protocolsList: [String]) {
            self.createTime = createTime
            self.lastUpdateTime = lastUpdateTime
            self.listId = listId
            self.listName = listName
            self.listUpdateToken = listUpdateToken
            self.previousProtocolsList = previousProtocolsList
            self.protocolsList = protocolsList
        }

        public func validate(name: String) throws {
            try self.validate(self.listId, name: "listId", parent: name, max: 36)
            try self.validate(self.listId, name: "listId", parent: name, min: 36)
            try self.validate(self.listId, name: "listId", parent: name, pattern: "^[a-z0-9A-Z-]{36}$")
            try self.validate(self.listName, name: "listName", parent: name, max: 128)
            try self.validate(self.listName, name: "listName", parent: name, min: 1)
            try self.validate(self.listName, name: "listName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.listUpdateToken, name: "listUpdateToken", parent: name, max: 1024)
            try self.validate(self.listUpdateToken, name: "listUpdateToken", parent: name, min: 1)
            try self.validate(self.listUpdateToken, name: "listUpdateToken", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.previousProtocolsList?.forEach {
                try validate($0.key, name: "previousProtocolsList.key", parent: name, max: 2)
                try validate($0.key, name: "previousProtocolsList.key", parent: name, min: 1)
                try validate($0.key, name: "previousProtocolsList.key", parent: name, pattern: "^\\d{1,2}$")
            }
            try self.protocolsList.forEach {
                try validate($0, name: "protocolsList[]", parent: name, max: 20)
                try validate($0, name: "protocolsList[]", parent: name, min: 1)
                try validate($0, name: "protocolsList[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case createTime = "CreateTime"
            case lastUpdateTime = "LastUpdateTime"
            case listId = "ListId"
            case listName = "ListName"
            case listUpdateToken = "ListUpdateToken"
            case previousProtocolsList = "PreviousProtocolsList"
            case protocolsList = "ProtocolsList"
        }
    }

    public struct ProtocolsListDataSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the specified protocols list.
        public let listArn: String?
        /// The ID of the specified protocols list.
        public let listId: String?
        /// The name of the specified protocols list.
        public let listName: String?
        /// An array of protocols in the AWS Firewall Manager protocols list.
        public let protocolsList: [String]?

        public init(listArn: String? = nil, listId: String? = nil, listName: String? = nil, protocolsList: [String]? = nil) {
            self.listArn = listArn
            self.listId = listId
            self.listName = listName
            self.protocolsList = protocolsList
        }

        private enum CodingKeys: String, CodingKey {
            case listArn = "ListArn"
            case listId = "ListId"
            case listName = "ListName"
            case protocolsList = "ProtocolsList"
        }
    }

    public struct PutAppsListRequest: AWSEncodableShape {
        /// The details of the AWS Firewall Manager applications list to be created.
        public let appsList: AppsListData
        /// The tags associated with the resource.
        public let tagList: [Tag]?

        public init(appsList: AppsListData, tagList: [Tag]? = nil) {
            self.appsList = appsList
            self.tagList = tagList
        }

        public func validate(name: String) throws {
            try self.appsList.validate(name: "\(name).appsList")
            try self.tagList?.forEach {
                try $0.validate(name: "\(name).tagList[]")
            }
            try self.validate(self.tagList, name: "tagList", parent: name, max: 200)
            try self.validate(self.tagList, name: "tagList", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case appsList = "AppsList"
            case tagList = "TagList"
        }
    }

    public struct PutAppsListResponse: AWSDecodableShape {
        /// The details of the AWS Firewall Manager applications list.
        public let appsList: AppsListData?
        /// The Amazon Resource Name (ARN) of the applications list.
        public let appsListArn: String?

        public init(appsList: AppsListData? = nil, appsListArn: String? = nil) {
            self.appsList = appsList
            self.appsListArn = appsListArn
        }

        private enum CodingKeys: String, CodingKey {
            case appsList = "AppsList"
            case appsListArn = "AppsListArn"
        }
    }

    public struct PutNotificationChannelRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to record AWS Firewall Manager activity.
        public let snsRoleName: String
        /// The Amazon Resource Name (ARN) of the SNS topic that collects notifications from AWS Firewall Manager.
        public let snsTopicArn: String

        public init(snsRoleName: String, snsTopicArn: String) {
            self.snsRoleName = snsRoleName
            self.snsTopicArn = snsTopicArn
        }

        public func validate(name: String) throws {
            try self.validate(self.snsRoleName, name: "snsRoleName", parent: name, max: 1024)
            try self.validate(self.snsRoleName, name: "snsRoleName", parent: name, min: 1)
            try self.validate(self.snsRoleName, name: "snsRoleName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.snsTopicArn, name: "snsTopicArn", parent: name, max: 1024)
            try self.validate(self.snsTopicArn, name: "snsTopicArn", parent: name, min: 1)
            try self.validate(self.snsTopicArn, name: "snsTopicArn", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case snsRoleName = "SnsRoleName"
            case snsTopicArn = "SnsTopicArn"
        }
    }

    public struct PutPolicyRequest: AWSEncodableShape {
        /// The details of the AWS Firewall Manager policy to be created.
        public let policy: Policy
        /// The tags to add to the AWS resource.
        public let tagList: [Tag]?

        public init(policy: Policy, tagList: [Tag]? = nil) {
            self.policy = policy
            self.tagList = tagList
        }

        public func validate(name: String) throws {
            try self.policy.validate(name: "\(name).policy")
            try self.tagList?.forEach {
                try $0.validate(name: "\(name).tagList[]")
            }
            try self.validate(self.tagList, name: "tagList", parent: name, max: 200)
            try self.validate(self.tagList, name: "tagList", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
            case tagList = "TagList"
        }
    }

    public struct PutPolicyResponse: AWSDecodableShape {
        /// The details of the AWS Firewall Manager policy.
        public let policy: Policy?
        /// The Amazon Resource Name (ARN) of the policy.
        public let policyArn: String?

        public init(policy: Policy? = nil, policyArn: String? = nil) {
            self.policy = policy
            self.policyArn = policyArn
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
            case policyArn = "PolicyArn"
        }
    }

    public struct PutProtocolsListRequest: AWSEncodableShape {
        /// The details of the AWS Firewall Manager protocols list to be created.
        public let protocolsList: ProtocolsListData
        /// The tags associated with the resource.
        public let tagList: [Tag]?

        public init(protocolsList: ProtocolsListData, tagList: [Tag]? = nil) {
            self.protocolsList = protocolsList
            self.tagList = tagList
        }

        public func validate(name: String) throws {
            try self.protocolsList.validate(name: "\(name).protocolsList")
            try self.tagList?.forEach {
                try $0.validate(name: "\(name).tagList[]")
            }
            try self.validate(self.tagList, name: "tagList", parent: name, max: 200)
            try self.validate(self.tagList, name: "tagList", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case protocolsList = "ProtocolsList"
            case tagList = "TagList"
        }
    }

    public struct PutProtocolsListResponse: AWSDecodableShape {
        /// The details of the AWS Firewall Manager protocols list.
        public let protocolsList: ProtocolsListData?
        /// The Amazon Resource Name (ARN) of the protocols list.
        public let protocolsListArn: String?

        public init(protocolsList: ProtocolsListData? = nil, protocolsListArn: String? = nil) {
            self.protocolsList = protocolsList
            self.protocolsListArn = protocolsListArn
        }

        private enum CodingKeys: String, CodingKey {
            case protocolsList = "ProtocolsList"
            case protocolsListArn = "ProtocolsListArn"
        }
    }

    public struct ResourceTag: AWSEncodableShape & AWSDecodableShape {
        /// The resource tag key.
        public let key: String
        /// The resource tag value.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct ResourceViolation: AWSDecodableShape {
        /// Violation details for an EC2 instance.
        public let awsEc2InstanceViolation: AwsEc2InstanceViolation?
        /// Violation details for network interface.
        public let awsEc2NetworkInterfaceViolation: AwsEc2NetworkInterfaceViolation?
        /// Violation details for security groups.
        public let awsVPCSecurityGroupViolation: AwsVPCSecurityGroupViolation?
        /// Violation detail for an Network Firewall policy that indicates that a subnet is not associated with the expected Firewall Manager managed route table.
        public let networkFirewallMissingExpectedRTViolation: NetworkFirewallMissingExpectedRTViolation?
        /// Violation detail for an Network Firewall policy that indicates that a subnet has no Firewall Manager managed firewall in its VPC.
        public let networkFirewallMissingFirewallViolation: NetworkFirewallMissingFirewallViolation?
        /// Violation detail for an Network Firewall policy that indicates that an Availability Zone is missing the expected Firewall Manager managed subnet.
        public let networkFirewallMissingSubnetViolation: NetworkFirewallMissingSubnetViolation?
        /// Violation detail for an Network Firewall policy that indicates that a firewall policy in an individual account has been modified in a way that makes it noncompliant. For example, the individual account owner might have deleted a rule group, changed the priority of a stateless rule group, or changed a policy default action.
        public let networkFirewallPolicyModifiedViolation: NetworkFirewallPolicyModifiedViolation?

        public init(awsEc2InstanceViolation: AwsEc2InstanceViolation? = nil, awsEc2NetworkInterfaceViolation: AwsEc2NetworkInterfaceViolation? = nil, awsVPCSecurityGroupViolation: AwsVPCSecurityGroupViolation? = nil, networkFirewallMissingExpectedRTViolation: NetworkFirewallMissingExpectedRTViolation? = nil, networkFirewallMissingFirewallViolation: NetworkFirewallMissingFirewallViolation? = nil, networkFirewallMissingSubnetViolation: NetworkFirewallMissingSubnetViolation? = nil, networkFirewallPolicyModifiedViolation: NetworkFirewallPolicyModifiedViolation? = nil) {
            self.awsEc2InstanceViolation = awsEc2InstanceViolation
            self.awsEc2NetworkInterfaceViolation = awsEc2NetworkInterfaceViolation
            self.awsVPCSecurityGroupViolation = awsVPCSecurityGroupViolation
            self.networkFirewallMissingExpectedRTViolation = networkFirewallMissingExpectedRTViolation
            self.networkFirewallMissingFirewallViolation = networkFirewallMissingFirewallViolation
            self.networkFirewallMissingSubnetViolation = networkFirewallMissingSubnetViolation
            self.networkFirewallPolicyModifiedViolation = networkFirewallPolicyModifiedViolation
        }

        private enum CodingKeys: String, CodingKey {
            case awsEc2InstanceViolation = "AwsEc2InstanceViolation"
            case awsEc2NetworkInterfaceViolation = "AwsEc2NetworkInterfaceViolation"
            case awsVPCSecurityGroupViolation = "AwsVPCSecurityGroupViolation"
            case networkFirewallMissingExpectedRTViolation = "NetworkFirewallMissingExpectedRTViolation"
            case networkFirewallMissingFirewallViolation = "NetworkFirewallMissingFirewallViolation"
            case networkFirewallMissingSubnetViolation = "NetworkFirewallMissingSubnetViolation"
            case networkFirewallPolicyModifiedViolation = "NetworkFirewallPolicyModifiedViolation"
        }
    }

    public struct SecurityGroupRemediationAction: AWSDecodableShape {
        /// Brief description of the action that will be performed.
        public let description: String?
        /// Indicates if the current action is the default action.
        public let isDefaultAction: Bool?
        /// The remediation action that will be performed.
        public let remediationActionType: RemediationActionType?
        /// The final state of the rule specified in the ViolationTarget after it is remediated.
        public let remediationResult: SecurityGroupRuleDescription?

        public init(description: String? = nil, isDefaultAction: Bool? = nil, remediationActionType: RemediationActionType? = nil, remediationResult: SecurityGroupRuleDescription? = nil) {
            self.description = description
            self.isDefaultAction = isDefaultAction
            self.remediationActionType = remediationActionType
            self.remediationResult = remediationResult
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case isDefaultAction = "IsDefaultAction"
            case remediationActionType = "RemediationActionType"
            case remediationResult = "RemediationResult"
        }
    }

    public struct SecurityGroupRuleDescription: AWSDecodableShape {
        /// The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types.
        public let fromPort: Int64?
        /// The IPv4 ranges for the security group rule.
        public let iPV4Range: String?
        /// The IPv6 ranges for the security group rule.
        public let iPV6Range: String?
        /// The ID of the prefix list for the security group rule.
        public let prefixListId: String?
        /// The IP protocol name (tcp, udp, icmp, icmpv6) or number.
        public let `protocol`: String?
        /// The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes.
        public let toPort: Int64?

        public init(fromPort: Int64? = nil, iPV4Range: String? = nil, iPV6Range: String? = nil, prefixListId: String? = nil, protocol: String? = nil, toPort: Int64? = nil) {
            self.fromPort = fromPort
            self.iPV4Range = iPV4Range
            self.iPV6Range = iPV6Range
            self.prefixListId = prefixListId
            self.`protocol` = `protocol`
            self.toPort = toPort
        }

        private enum CodingKeys: String, CodingKey {
            case fromPort = "FromPort"
            case iPV4Range = "IPV4Range"
            case iPV6Range = "IPV6Range"
            case prefixListId = "PrefixListId"
            case `protocol` = "Protocol"
            case toPort = "ToPort"
        }
    }

    public struct SecurityServicePolicyData: AWSEncodableShape & AWSDecodableShape {
        /// Details about the service that are specific to the service type, in JSON format. For service type SHIELD_ADVANCED, this is an empty string.   Example: NETWORK_FIREWALL   "{\"type\":\"NETWORK_FIREWALL\",\"networkFirewallStatelessRuleGroupReferences\":[{\"resourceARN\":\"arn:aws:network-firewall:us-west-1:1234567891011:stateless-rulegroup/rulegroup2\",\"priority\":10}],\"networkFirewallStatelessDefaultActions\":[\"aws:pass\",\"custom1\"],\"networkFirewallStatelessFragmentDefaultActions\":[\"custom2\",\"aws:pass\"],\"networkFirewallStatelessCustomActions\":[{\"actionName\":\"custom1\",\"actionDefinition\":{\"publishMetricAction\":{\"dimensions\":[{\"value\":\"dimension1\"}]}}},{\"actionName\":\"custom2\",\"actionDefinition\":{\"publishMetricAction\":{\"dimensions\":[{\"value\":\"dimension2\"}]}}}],\"networkFirewallStatefulRuleGroupReferences\":[{\"resourceARN\":\"arn:aws:network-firewall:us-west-1:1234567891011:stateful-rulegroup/rulegroup1\"}],\"networkFirewallOrchestrationConfig\":{\"singleFirewallEndpointPerVPC\":true,\"allowedIPV4CidrList\":[\"10.24.34.0/28\"]} }"    Example: WAFV2   "{\"type\":\"WAFV2\",\"preProcessRuleGroups\":[{\"ruleGroupArn\":null,\"overrideAction\":{\"type\":\"NONE\"},\"managedRuleGroupIdentifier\":{\"version\":null,\"vendorName\":\"AWS\",\"managedRuleGroupName\":\"AWSManagedRulesAmazonIpReputationList\"},\"ruleGroupType\":\"ManagedRuleGroup\",\"excludeRules\":[]}],\"postProcessRuleGroups\":[],\"defaultAction\":{\"type\":\"ALLOW\"},\"overrideCustomerWebACLAssociation\":false,\"loggingConfiguration\":{\"logDestinationConfigs\":[\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\"],\"redactedFields\":[{\"redactedFieldType\":\"SingleHeader\",\"redactedFieldValue\":\"Cookies\"},{\"redactedFieldType\":\"Method\"}]}}"  In the loggingConfiguration, you can specify one logDestinationConfigs, you can optionally provide up to 20 redactedFields, and the RedactedFieldType must be one of URI, QUERY_STRING, HEADER, or METHOD.   Example: WAF Classic   "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"12345678-1bcd-9012-efga-0987654321ab\", \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": \"BLOCK\"}}"    Example: SECURITY_GROUPS_COMMON   "{\"type\":\"SECURITY_GROUPS_COMMON\",\"revertManualSecurityGroupChanges\":false,\"exclusiveResourceSecurityGroupManagement\":false, \"applyToAllEC2InstanceENIs\":false,\"securityGroups\":[{\"id\":\" sg-000e55995d61a06bd\"}]}"    Example: SECURITY_GROUPS_CONTENT_AUDIT   "{\"type\":\"SECURITY_GROUPS_CONTENT_AUDIT\",\"securityGroups\":[{\"id\":\"sg-000e55995d61a06bd\"}],\"securityGroupAction\":{\"type\":\"ALLOW\"}}"  The security group action for content audit can be ALLOW or DENY. For ALLOW, all in-scope security group rules must be within the allowed range of the policy's security group rules. For DENY, all in-scope security group rules must not contain a value or a range that matches a rule value or range in the policy security group.   Example: SECURITY_GROUPS_USAGE_AUDIT   "{\"type\":\"SECURITY_GROUPS_USAGE_AUDIT\",\"deleteUnusedSecurityGroups\":true,\"coalesceRedundantSecurityGroups\":true}"
        public let managedServiceData: String?
        /// The service that the policy is using to protect the resources. This specifies the type of policy that is created, either an AWS WAF policy, a Shield Advanced policy, or a security group policy. For security group policies, Firewall Manager supports one security group for each common policy and for each content audit policy. This is an adjustable limit that you can increase by contacting AWS Support.
        public let type: SecurityServiceType

        public init(managedServiceData: String? = nil, type: SecurityServiceType) {
            self.managedServiceData = managedServiceData
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.managedServiceData, name: "managedServiceData", parent: name, max: 4096)
            try self.validate(self.managedServiceData, name: "managedServiceData", parent: name, min: 1)
            try self.validate(self.managedServiceData, name: "managedServiceData", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case managedServiceData = "ManagedServiceData"
            case type = "Type"
        }
    }

    public struct StatefulRuleGroup: AWSDecodableShape {
        /// The resource ID of the rule group.
        public let resourceId: String?
        /// The name of the rule group.
        public let ruleGroupName: String?

        public init(resourceId: String? = nil, ruleGroupName: String? = nil) {
            self.resourceId = resourceId
            self.ruleGroupName = ruleGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case ruleGroupName = "RuleGroupName"
        }
    }

    public struct StatelessRuleGroup: AWSDecodableShape {
        /// The priority of the rule group. AWS Network Firewall evaluates the stateless rule groups in a firewall policy starting from the lowest priority setting.
        public let priority: Int?
        /// The resource ID of the rule group.
        public let resourceId: String?
        /// The name of the rule group.
        public let ruleGroupName: String?

        public init(priority: Int? = nil, resourceId: String? = nil, ruleGroupName: String? = nil) {
            self.priority = priority
            self.resourceId = resourceId
            self.ruleGroupName = ruleGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case priority = "Priority"
            case resourceId = "ResourceId"
            case ruleGroupName = "RuleGroupName"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.
        public let key: String
        /// Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to return tags for. The AWS Firewall Manager resources that support tagging are policies, applications lists, and protocols lists.
        public let resourceArn: String
        /// The tags to add to the resource.
        public let tagList: [Tag]

        public init(resourceArn: String, tagList: [Tag]) {
            self.resourceArn = resourceArn
            self.tagList = tagList
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1024)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.tagList.forEach {
                try $0.validate(name: "\(name).tagList[]")
            }
            try self.validate(self.tagList, name: "tagList", parent: name, max: 200)
            try self.validate(self.tagList, name: "tagList", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagList = "TagList"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to return tags for. The AWS Firewall Manager resources that support tagging are policies, applications lists, and protocols lists.
        public let resourceArn: String
        /// The keys of the tags to remove from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1024)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ViolationDetail: AWSDecodableShape {
        /// The AWS account that the violation details were requested for.
        public let memberAccount: String
        /// The ID of the AWS Firewall Manager policy that the violation details were requested for.
        public let policyId: String
        /// Brief description for the requested resource.
        public let resourceDescription: String?
        /// The resource ID that the violation details were requested for.
        public let resourceId: String
        /// The ResourceTag objects associated with the resource.
        public let resourceTags: [Tag]?
        /// The resource type that the violation details were requested for.
        public let resourceType: String
        /// List of violations for the requested resource.
        public let resourceViolations: [ResourceViolation]

        public init(memberAccount: String, policyId: String, resourceDescription: String? = nil, resourceId: String, resourceTags: [Tag]? = nil, resourceType: String, resourceViolations: [ResourceViolation]) {
            self.memberAccount = memberAccount
            self.policyId = policyId
            self.resourceDescription = resourceDescription
            self.resourceId = resourceId
            self.resourceTags = resourceTags
            self.resourceType = resourceType
            self.resourceViolations = resourceViolations
        }

        private enum CodingKeys: String, CodingKey {
            case memberAccount = "MemberAccount"
            case policyId = "PolicyId"
            case resourceDescription = "ResourceDescription"
            case resourceId = "ResourceId"
            case resourceTags = "ResourceTags"
            case resourceType = "ResourceType"
            case resourceViolations = "ResourceViolations"
        }
    }
}
